package com.wyp168.jse;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

/**
 * @ClassName StreamDemo001
 * @Description TODO
 * @Author wyp168
 * @Date 2022/7/8 12:38
 */
public class StreamDemo001 {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("1");
        list.add("2");
        list.add("1");

        Set<String> set = list.stream().collect(Collectors.toSet());
        System.out.println(set);
    }
}
